<template>
    <div class="about">
        <h3>vuex 中的 count 值：{{ $store.state.user.count }}</h3>
        <h3>{{ $store.getters['user/sum'] }}</h3>
        <button @click="add">add</button>
        <button @click="addAsync">addAsync</button>
    </div>
</template>

<script>
export default {
    name: 'about',
    methods: {
        add() {
            this.$store.commit('user/increate', 2);
        },
        addAsync() {
            this.$store.dispatch('user/increateAsync', 10);
        },
    },
};
</script>
